#include "avl_tree.h"
#include <stdio.h>
#include <time.h>
extern int times;
int main(){
    FILE *fp;
    AvlTree t;
    clock_t start,finish;
    ElementType i;
    //插入10000条随机数生成器生成的数据
    fp=fopen("C:\\Users\\98770\\CLionProjects\\lab_2\\data.txt","r");
    while (fscanf(fp,"%d",&i)!=EOF)
        t=Insert(i,t);
    start=clock();A
    //存在的节点
    Find(16317,t);
//    printf("%d\n",times);
    Find(823,t);
//    printf("%d\n",times);
    Find(10633,t);
//    printf("%d\n",times);
    Find(8259,t);
//    printf("%d\n",times);
//    Delete(823,t);
    //不存在的节点
    Find(30001,t);
//    printf("%d\n",times);
    Find(-1,t);
//    printf("%d\n",times);
    finish=clock();
    printf("%lf",(double)(finish-start)/CLOCKS_PER_SEC);
    fclose(fp);
    MakeEmpty(t);
}